CSharpTest.Net
Item Property
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Collections Namespace > LurchTable<TKey,TValue> Class : Item Property

key

Glossary Item Box

Gets or sets the element with the specified key.

Syntax

Visual Basic (Declaration) 
Public Default Property Item( _
   ByVal key As TKey _
) As TValue
C# 
public TValue this[ 
   TKey key
]; {get; set;}

Parameters

key

Example

Library/Library.Test/TestLurchTable.cs

C#Copy Code
LurchTableTest<string, string> test = new LurchTableTest<string, string>(StringComparer.Ordinal);
test["a"] = "b";
Assert.AreEqual(1, test.Count);
test.Initialize();
Assert.AreEqual(0, test.Count);
VB.NETCopy Code
Dim test As New LurchTableTest(Of String, String)(StringComparer.Ordinal)
test("a") = "b"
Assert.AreEqual(1, test.Count)
test.Initialize()
Assert.AreEqual(0, test.Count)

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys